package com.xiaomazi.edu.service;

import com.xiaomazi.common.utils.R;
import com.xiaomazi.edu.dto.front.CommentFrontDTO;
import com.xiaomazi.edu.entity.Comment;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

public interface CommentService extends IService<Comment>{


    /**
     * 根据课程Id获取课程评论
     * @param commentFrontDTO 课程id 评论内容
     * @return 课程评论数据 总记录条数
     */
    R getCommentsByCourseId(CommentFrontDTO commentFrontDTO);

    /**
     * 添加课程评论
     * @param comment 课程信息
     * @return ok
     */
    R saveComment(Comment comment,String userId);
}
